class UserDetail < ActiveRecord::Base
  belongs_to :user, :class_name => "User"  
  validates_numericality_of :qq,  :message => "请注意QQ应为数字", :if => Proc.new{|u| !u.qq.blank?}
  validates_format_of :msn,  :message => "MSN不合法!",:with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i,:if => Proc.new{|u| !u.msn.blank?}  
end
